3139
14060
Chcę pobrać tekst z sieci, napisałem kod, używam indexOf i subString, ale to nie działa.
int index = response_str.indexOf ("Zdalny adres IP:");
index + = "Zdalny adres IP:". length ();
indeks + = "

". length (); int end = response_str.indexOf ("


", indeks); String strIP = response_str.substring (indeks, koniec); Log.d ("", "Hello" + strIP); A to jest przykładowy tekst, chcę uzyskać 49.156.53.152
Zdalny adres IP:

** 49.156.53.152 **


UserAgent:

Mozilla / 5.0 (Windows NT 6.1; WOW64) AppleWebKit / 537.11 (KHTML, jak Gecko) Chrome / 23.0.1271.64 Safari / 537.11